/**
 * @检测关系运算
 *
 * @author	 wangshikun <wangshikun2010@gmail.com>
 * @copyright	(c) 2012 wangshikun <wangshikun2010@gmail.com>
 * @license	http://www.opensource.org/licenses/mit-license.php The MIT License
 * @package	default
 * @subpackage	default
 */

#include <stdio.h>
#include <cs50.h>
#define printt(x, y, z) printf("x=%d,y=%d,z=%d\n", x, y, z);

int main(int argc, char *argv[]) {
	int x, y, z;

	x = y = z = 2;
	++x || ++y && ++z;
	printt(x, y, z);

	x = y = z = 2;
	++x && ++y || ++z;
	printt(x, y, z);

	x = y = z = 2;
	++x && ++y && ++z;
	printt(x, y, z);

	//当x,y,z小于0时，运行是遵循的规律不变
	x = y = z = -2;
	++x || ++y && ++z;
	printt(x, y, z);

	x = y = z = -2;
	++x && ++y || ++z;
	printt(x, y, z);

	x = y = z = -2;
	++x && ++y && ++z;
	printt(x, y, z);
}
